home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 244 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.3 KB

  1. Path: fnnews.fnal.gov!not-for-mail
  2. From: b91926@fnclub.fnal.gov (David Sachs)
  3. Newsgroups: comp.std.c
  4. Subject: Re: Two questions - Pointer equality and ...
  5. Date: 30 Jan 1996 21:47:02 -0600
  6. Organization: FERMILAB, Batavia, IL
  7. Message-ID: <4emonm$kqc@fnclub.fnal.gov>
  8. References: <4elq8a$j0b@taurus.fccc.edu> <TANMOY.96Jan30150808@qcd.lanl.gov> <9601310155.AA07417@dxmint.cern.ch>
  9. Reply-To: sachs@fnal.fnal.gov
  10. NNTP-Posting-Host: fnclub.fnal.gov
  11. X-Newsreader: NN version 6.5.0 #2 (NOV)
  12.  
  13. Dan Pop <danpop@mail.cern.ch> writes:
  14. ...
  15. >The full answer is in ANSI classic 3.1.4:
  16.  
  17. >    Identical string literals of either form need not be distinct.  If
  18. >    the program attempts to modify a string literal of either form, the
  19. >    behavior is undefined.
  20.  
  21. I think it is rather unfortunate, that "const" came in so late.
  22.  
  23. Logically the proper tye of a string literal should be const char*
  24. rather than char*, but there is just too much code written with
  25. the old usage, for such a change to ever be feasible.
  26. -- 
  27. * IRS, IRS, lord of the federal tax, checking all income and every deduction, *
  28. * mailing out form 10 40, penalizing noncompliers, regulating, and auditing.  *
  29. David Sachs - Fermilab, HPPC MS369 - P. O. Box 500 - Batavia, IL 60510
  30. Voice: 1 708 840 3942      Deparment Fax: 1 708 840 3785
  31.